package com.zuo.entity;

import java.util.Date;
import java.util.Objects;

/**
 * @Author 白白旧维
 * @Date 2022/2/28 18:41
 */
public class Doc {

    private int docid;
    private User user;
    private String dtitle;
    private Date dcreateTime;
    private String ddesc;
    private String dpath;
    private String createTime;

    public Doc() {
        this.user = new User();
    }

    public Doc(int docid, User user, String dtitle, Date dcreateTime, String ddesc, String dpath) {
        this.docid = docid;
        this.user = user;
        this.dtitle = dtitle;
        this.dcreateTime = dcreateTime;
        this.ddesc = ddesc;
        this.dpath = dpath;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public int getDocid() {
        return docid;
    }

    public void setDocid(int docid) {
        this.docid = docid;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public String getDtitle() {
        return dtitle;
    }

    public void setDtitle(String dtitle) {
        this.dtitle = dtitle;
    }

    public Date getDcreateTime() {
        return dcreateTime;
    }

    public void setDcreateTime(Date dcreateTime) {
        this.dcreateTime = dcreateTime;
    }

    public String getDdesc() {
        return ddesc;
    }

    public void setDdesc(String ddesc) {
        this.ddesc = ddesc;
    }

    public String getDpath() {
        return dpath;
    }

    public void setDpath(String dpath) {
        this.dpath = dpath;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Doc doc = (Doc) o;
        return docid == doc.docid &&
                Objects.equals(user, doc.user) &&
                Objects.equals(dtitle, doc.dtitle) &&
                Objects.equals(dcreateTime, doc.dcreateTime) &&
                Objects.equals(ddesc, doc.ddesc) &&
                Objects.equals(dpath, doc.dpath);
    }

    @Override
    public int hashCode() {
        return Objects.hash(docid, user, dtitle, dcreateTime, ddesc, dpath);
    }

    @Override
    public String toString() {
        return "Doc{" +
                "docid=" + docid +
                ", user=" + user +
                ", dtitle='" + dtitle + '\'' +
                ", dcreateTime=" + dcreateTime +
                ", ddesc='" + ddesc + '\'' +
                ", dpath='" + dpath + '\'' +
                '}';
    }
}
